﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<MvcWebRole1.Models.ViewMessageModel>"  %>
<%@ Import Namespace="MvcWebRole1.Helpers" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title><%: Model.Message==null ? "メッセージ無し" :  Model.Message.Title%></title>
</head>
<body>
<% if (Model.Message != null) { %>
	<p>タイトル</p>
	<%: Model.Message.Title%> <% if(Model.Message.Impotance){%>[重要]<%} %> <% if(Model.Message.Unread){%>[未読]<%} %>
	<p>送信者</p>
	<%: Model.Message.Sender%>
	<p>送信日時</p>
	<%: Model.Message.SendAt.AdjustTimeZone(+9).ToString("yyyy/MM/dd HH:mm:ss")%>
	<p>本文</p>
	<%: Model.Message.Content%>
	<% if (Model.Message.Unread) { %>
	<%: Html.ActionLink("未読をクリアして次へ", "Next", new { id = Model.Message.RowKey, mode = Model.Mode, markRead = true })%>
	<%} %>
	<%: Html.ActionLink("次へ", "Next", new { id = Model.Message.RowKey, mode = Model.Mode })%>
	<% if (Model.Message.Impotance) { %>
	<%: Html.ActionLink("重要マークを解除","Unmark", new {id=Model.Message.RowKey, mode=Model.Mode}) %>
	<% } %>
	<% if (!Model.Message.Impotance) { %>
	<%: Html.ActionLink("重要とマークして次へ", "Next", new { id = Model.Message.RowKey, mode = Model.Mode, markImportance = true, markRead = true })%>
	<% } %>
	<%: Html.ActionLink("前へ", "Prev", new { id = Model.Message.RowKey, mode = Model.Mode })%>
<% } else {%>
	メッセージはありません。
	<%: Html.ActionLink("一覧へ戻る","Index") %>
<% } %>
</body>
</html>
